﻿#include <SMART_STRING.HPP>

using namespace CxxlMan;

MB_String::MB_String(const UNICODE_String &wcs, ISpirit *spirit)
  :Smart_Ptr(Create_string_wrapper(Convert((const wchar_t*)wcs),spirit), rootObject)
{
}

MB_String& cxxlFASTCALL MB_String::operator =(const UNICODE_String &wcs)
{
  *this = MB_String(wcs,(*this)->GetSpirit());
  return *this;
}

UNICODE_String::UNICODE_String(const MB_String &mbs, ISpirit *spirit)
    :Smart_Ptr(Create_string_wrapper(Convert((const char*)mbs),spirit), rootObject)
{
}

UNICODE_String& cxxlFASTCALL UNICODE_String::operator =(const MB_String &mbs)
{
  *this = UNICODE_String(mbs,(*this)->GetSpirit());
  return *this;
}
